<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
	    <title>主页</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<link href="css/userHomePage.css" rel="stylesheet" type="text/css" media="screen">
		<link href="css/userInfo.css" rel="stylesheet" type="text/css" media="screen">
		<script type="text/javascript" src="js/jquery-1.9.0.min.js"></script>
		<script type="text/javascript" src="js/userHomePage.js"></script>
		<script>
	        $(function(){
	            $('#silder').imgSilder({
					s_width:500, 
					s_height:334, 
					is_showTit:true, 
					s_times:2000, 
				});
			});
		</script>
	</head>
	<body>
	
	   <ul id="nav">
			<li><a href="#">个人中心</a>
				<ul>
	                <li><a href="getUserInfo.do?page=redirect:user/info.jsp">个人信息</a></li>	   
	                <% boolean flag=false; 
	                   String account=null;
	                   Cookie cookies[] = request.getCookies();                   
	                   if(cookies!=null){
	                   for(int i=0;i<cookies.length;i++){
	                	   if("uid".equals(cookies[i].getName())) flag =true;
	                	   if("account".equals(cookies[i].getName())) 
	                		   account = cookies[i].getValue();               	   	                	   
	                     }
	                   }
	                 if(flag){%>
	                 <li><a href="user/publicGame.jsp">发布约战</a></li>
					  <li><a href="logout.do">退出登录</a></li>
					 <%}else{%>
					<li><a href="user/login.jsp">登录</a></li>	 
					<li><a href="user/register.jsp">注册</a></li>
					 <%}%>
            	</ul>
			</li>
			<li><a href="#">首页</a></li>
			<%if(account!=null){%>
			      <li><a href="getUserInfo.do?page=redirect:user/info.jsp"><%=account%>已登录</a></li>
			 <%}%>
			 
			 <li><a href="getSchoolInfo.do">预定场地</a></li>
			 <li><a href="getMatchInfo.do?pageName=redirect:user/matchList.jsp&page=1">赛事</a></li>
			 <li><a href="getBatteInfo.do?pageName=redirect:user/battleList.jsp&page=1">约战</a></li>
		</ul>
		

		<div class="silder" id="silder">
			<ul class="silder_list" id="silder_list">
			    <li> <img src="images/1.jpg" border="0" alt="图片1"> </li>
			    <li> <img src="images/2.jpg" border="0" alt="图片2"> </li>
			    <li> <img src="images/3.jpg" border="0" alt="图片3"> </li>
			    <li> <img src="images/4.jpg" border="0" alt="图片4"> </li>
			</ul>
		</div>
		<div class="rightInfo">
			<label>大学城近期体育赛事</label>
			<li><a href="#">广工举办网球比赛</a></li>
			<li><a href="#">华师举办篮球比赛</a></li>
			<li><a href="#">华工举办足球比赛</a></li>
			<li><a href="#">广工举办网球比赛</a></li>
			<li><a href="#">华师举办篮球比赛</a></li>
			<li><a href="#">华工举办足球比赛</a></li>
			<li><a href="#">广工举办网球比赛</a></li>
			<li><a href="#">华师举办篮球比赛</a></li>
			<li><a href="#">华工举办足球比赛</a></li>
			<li><a href="#">广工举办网球比赛</a></li>
		</div>
	</body>
</html>